package com.macro.mall.controller;

import com.macro.mall.common.api.CommonResult;
import com.macro.mall.dto.PmsItem;
import com.macro.mall.service.PmsItemTypeService;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * @Author：Minxiao-Hao
 * @Description: 物品类型控制层
 * @name：PmsItemTypeController
 * @Date：2024/11/2 12:19
 */
@Controller
@RequestMapping("/itemType")
public class PmsItemTypeController {

    @Autowired
    private PmsItemTypeService pmsItemTypeService;

    @Operation(summary = "查询物品类型信息")
    @RequestMapping(value = "/list", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult<List<PmsItem>> list() {
        List<PmsItem> list = pmsItemTypeService.list();
        return CommonResult.success(list);
    }

}
